function userinfo(d,t,tid){
    if(!tid){ tid = 0; }
    $('#dialog-form').remove();
    if(parent.document.getElementById('dialog-form')){
        window.location.href = '/Users/userinfo/' + d + '?type=' + t + '&tid=' + tid;
        return;
    }
    $('body').append('<div id="dialog-form"></div>');
    var dialog = $("#dialog-form").dialog({
        autoOpen: false,
        height: $(document).height() * 0.8,
        width: '90%',
        show:'fade',
        hide:'fade',
        resizable : false,
        modal: true,
    });
    $("#dialog-form").html('<iframe id="ifr" src="/Users/userinfo/'+d+'?type='+t+'&tid='+tid+'" scrolling="auto" width="100%" height="100%" frameborder="0"></iframe>');
    dialog.dialog({title:"用户详情"});
    dialog.dialog("open");
}

function show_remote(url,title,d,t,tid){
    if(!t){ t = 0; }
    if(!tid){ tid = 0; }
    $('#dialog_show_remote').remove();
    if(parent.document.getElementById('dialog_show_remote')){
        window.location.href = url + d + '?type=' + t + '&tid=' + tid;
        return;
    }
    $('body').append('<div id="dialog_show_remote"></div>');
    var dialog = $("#dialog_show_remote").dialog({
        autoOpen: false,
        height: $(document).height() * 0.5,
        width: '90%',
        show:'fade',
        hide:'fade',
        resizable : false,
        modal: true,
    });
    $("#dialog_show_remote").html('<iframe id="ifr" src="'+url+'/'+d+'?t='+t+'&tid='+tid+'" scrolling="auto" width="100%" height="100%" frameborder="0"></iframe>');
    dialog.dialog({title:title});
    dialog.dialog("open");
}